<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="Library" targetNamespace="urn:microsoft:guidanceexplorer" elementFormDefault="qualified" xmlns="urn:microsoft:guidanceexplorer" xmlns:mstns="urn:microsoft:guidanceexplorer" xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:complexType name="Library">
		<xs:sequence>
			<xs:element name="libraryStructure" type="LibraryStructure" maxOccurs="1" minOccurs="1" />
			<xs:element name="items" type="Items" minOccurs="1" maxOccurs="1" />
			<xs:element name="columns" type="Columns" minOccurs="0" maxOccurs="1" />
		</xs:sequence>
		<xs:attribute name="caption" type="xs:string" />
		<xs:attribute name="readProtection" type="xs:string" />
		<xs:attribute name="name" type="xs:string" />
		<xs:attribute name="suscribed" type="xs:boolean" />
		<xs:attribute name="originalSource" type="xs:string" />
		<xs:attribute name="webSuscribed" type="xs:boolean" />
    <xs:attribute name="url" type="xs:string" />
	</xs:complexType>
	<xs:complexType name="LibraryStructure">
		<xs:sequence>
			<xs:element name="folder" type="Folder" maxOccurs="unbounded" minOccurs="0" />
			<xs:choice maxOccurs="unbounded" minOccurs="0">
				<xs:element name="view" type="View" maxOccurs="unbounded" minOccurs="0" />
				<xs:element name="searchView" type="SearchView" maxOccurs="unbounded" minOccurs="0" />
			</xs:choice>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="Folder">
		<xs:sequence>
			<xs:element name="columns" type="Columns" minOccurs="1" maxOccurs="1" />
			<xs:choice maxOccurs="unbounded" minOccurs="0">
				<xs:element name="folder" type="Folder" minOccurs="0" maxOccurs="unbounded" />
        <xs:element name="view" type="View" minOccurs="0" maxOccurs="unbounded" />
        <xs:element name="checklist" type="View" minOccurs="0" maxOccurs="unbounded" />
        <xs:element name="searchView" type="SearchView" maxOccurs="unbounded" minOccurs="0" />
			</xs:choice>
		</xs:sequence>
		<xs:attribute name="caption" type="xs:string" />
	</xs:complexType>
  <xs:complexType name="View">
		<xs:sequence>
			<xs:element name="columns" type="Columns" />
			<xs:element name="items" type="Items" minOccurs="1" maxOccurs="1" />
    </xs:sequence>
		<xs:attribute name="caption" type="xs:string" />
		<xs:attribute name="author" type="xs:string" />
		<xs:attribute name="description" type="xs:string" />
		<xs:attribute name="creationDate" type="xs:dateTime" />
		<xs:attribute name="id" type="xs:string" />
		<xs:attribute name="rootView" type="xs:boolean" />
	</xs:complexType>
	<xs:complexType name="SearchView">
		<xs:sequence>
			<xs:element name="columns" type="Columns" />
			<xs:element name="criteria" type="xs:anyType" minOccurs="1" maxOccurs="1" />
		</xs:sequence>
		<xs:attribute name="caption" type="xs:string" />
		<xs:attribute name="author" type="xs:string" />
		<xs:attribute name="description" type="xs:string" />
		<xs:attribute name="creationDate" type="xs:dateTime" />
		<xs:attribute name="containerScope" type="xs:string" />
		<xs:attribute name="containerScopeType" type="xs:string" />
		<xs:attribute name="rootView" type="xs:boolean" />
    <xs:attribute name="id" type="xs:string" />
	</xs:complexType>
	<xs:complexType name="Items">
		<xs:sequence>
			<xs:element name="item" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
      <xs:element name="guidanceItem" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
	</xs:complexType>
	<xs:complexType name="Column">
		<xs:sequence>
		</xs:sequence>
		<xs:attribute name="source" type="xs:string" />
		<xs:attribute name="caption" type="xs:string" />
		<xs:attribute name="sort" type="xs:string" />
		<xs:attribute name="width" type="xs:string" />
		<xs:attribute name="visible" type="xs:boolean" />
		<xs:attribute name="position" type="xs:string" />
		<xs:attribute name="filter" type="xs:string" use="optional" />
	</xs:complexType>
	<xs:complexType name="Columns">
		<xs:sequence>
			<xs:element name="column" type="Column" minOccurs="0" maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>
	<xs:element name="guidanceExplorer">
		<xs:complexType>
			<xs:choice>
				<xs:element name="library" type="Library" />
				<xs:element name="userViews" type="UserViews" />
        <xs:element name="librariesColumns" type="Columns" />
        <xs:element name="globalViews" type="GlobalViews" />
			</xs:choice>
		</xs:complexType>
	</xs:element>
	<xs:complexType name="UserViews">
		<xs:sequence>
			<xs:element name="columns" type="Columns" minOccurs="0" maxOccurs="1" />
			<xs:element name="structure" type="LibraryStructure" maxOccurs="1" minOccurs="1" />
    </xs:sequence>
	</xs:complexType>
  <xs:complexType name="GlobalViews">
    <xs:sequence>
      <xs:element name="columns" type="Columns" minOccurs="0" maxOccurs="1" />
      <xs:element name="structure" type="LibraryStructure" maxOccurs="1" minOccurs="1" />
    </xs:sequence>
  </xs:complexType>
</xs:schema>